const fs = require('fs');
fs.writeFile("./test1.txt","fs模块学习",{encoding:"utf-8",mode:0o666,flag:"w"},err=>{
    if(!err){
        console.log('成功了！！')
    }else{
        console.log(err);
    }
})